Catamorphism-Based Transformation of Functional Programs

نویسندگان

  • Zhenjiang Hu
  • Hideya Iwasaki
  • Masato Takeichi
چکیده

Accumulations are operators on structured object that proceed their computation on each element of the object keeping some intermediate results. Accumulations are widely used in the design of e cient sequential and parallel programs. The purpose of this paper is to deal with the transformation on accumulations so that more e cient programs can be derived. We formulate accumulations by means of higher order catamorphisms and propose a promotion theorem for accumulations. Some examples are given to explain our method.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Promotional Transformation on Monadic Programs

Monads, proposed by Moggi [16] of their use in structuring denotational descriptions and then popularized by Wadler[21], are becoming an increasingly important tool for structural functional programming[8, 10, 11]. The reason is that monads provide a uniform framework for describing a wide range of programming language features including, for example, state, I/O, continuations, exceptions, pars...

متن کامل

Promotional Transformation of Monadic Programs

Monads are becoming an increasingly important tool for structural functional programming, because they provide a uniform framework for describing a wide range of programming language features. To facilitate program transformation, Fokkinga derived a su cient assumption under which there is a kind of socalled monadic catamorphisms which satisfy several general laws useful for the transformation ...

متن کامل

Using monads to fuse recursive programs

We try to combine the ‘syntactic composition of tree transducers’ [FV98, KV01] on the one hand side and ‘short cut fusion’ [GLP93] on the other hand side. Short cut fusion is based on the ‘cata/build-rule’ [Joh01] or ‘acid rain theorem’ [TM95]. Therefore it is necessary to represent the recursive functions as catamorphisms. A catamorphism is a generalization of the well known list-function fold...

متن کامل

Using Compact Data Representations for Languages Based on Catamorphisms

We describe a new method for improving the performance of functional programs based on catamorphisms. The method relies on using a compact vector representation for the recursive structure over which the catamorphism operates. This saves space and allows catamorphisms to be implemented in tail-recursive fashion even in cases where the standard linked structure representation requires non-tail-r...

متن کامل

A new approach to one-pass transformations

We show how to construct a one-pass optimizing transformation by fusing a non-optimizing transformation with an optimization pass. We state the transformation in build form and the optimization pass in cata form, i.e., as a catamorphism; and we use cata/build fusion to combine them. We illustrate the method by fusing Plotkin’s call-by-value and call-by-name CPS transformations with a reduction-...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1994